import launch
import launch.event_handlers
import launch_ros
import os
from ament_index_python.packages import get_package_share_directory
from launch.launch_description_sources import PythonLaunchDescriptionSource

def generate_launch_description():
    
    # pkg_share = get_package_share_directory('opencv_pkg')
    # 托盘位姿检测
    pallet_detect_node=launch_ros.actions.Node(
        package="opencv_pkg",
        # 节点文件名称
        executable="pallet_detect", 
        # 节点名称
        name="pallet_detect",
    )
    # agv插取托盘
    pallet_pick_node =launch_ros.actions.Node(
        package="opencv_pkg",
        # 节点文件名称
        executable="pallet_pick", 
        # 节点名称
        name="pallet_pick",
    )
    launch_description = launch.LaunchDescription()
    
    launch_description.add_action(pallet_detect_node)
    launch_description.add_action(pallet_pick_node)
    return launch_description